/* 管理模块通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

/* 管理容器布局 */
.admin-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* 侧边栏样式 */
.admin-sidebar {
    width: 250px;
    background-color: #001529;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: all 0.3s;
}

.admin-sidebar .admin-header {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: transparent;
    box-shadow: none;
    height: auto;
}

.admin-sidebar .logo-container {
    width: 80%;
    text-align: center;
}

.admin-sidebar .logo {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.admin-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-menu li {
    margin: 0;
    padding: 0;
}

.admin-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: all 0.3s;
}

.admin-menu a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.admin-menu li.active a {
    color: white;
    background-color: #1890ff;
}

.admin-menu i {
    margin-right: 10px;
    font-size: 16px;
}

/* 右侧内容区域 */
.admin-content {
    flex: 1;
    margin-left: 250px;
    overflow-x: hidden;
    background-color: #f0f2f5;
    min-height: 100vh;
    transition: all 0.3s;
}

/* 头部样式 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 64px;
    background-color: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-right: 15px;
    color: #333;
}

.breadcrumb {
    display: flex;
    align-items: center;
}

.breadcrumb span {
    margin: 0 5px;
    color: #333;
}

.breadcrumb i {
    font-size: 12px;
    color: #999;
}

.header-right {
    display: flex;
    align-items: center;
}

.admin-user {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.admin-user:hover {
    background-color: #f5f5f5;
}

.admin-user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.admin-user span {
    font-weight: 500;
    margin-right: 5px;
}

/* 内容区域 */
.content-section {
    padding: 20px;
    overflow-x: auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 80px;
    }
    
    .admin-content {
        margin-left: 80px;
    }
    
    .admin-sidebar .admin-menu span {
        display: none;
    }
    
    .admin-sidebar .logo-container {
        width: 60%;
    }
}

/* 折叠侧边栏状态 */
.admin-container.collapsed .admin-sidebar {
    width: 80px;
}

.admin-container.collapsed .admin-content {
    margin-left: 80px;
}

.admin-container.collapsed .admin-menu span {
    display: none;
}

.admin-container.collapsed .logo-container {
    width: 60%;
}

/* 下拉菜单 */
/* 用户下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    display: none;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 4px;
    padding: 8px 0;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 添加控制台页面特定样式 */

/* 状态卡片 */
.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #fff;
    font-size: 24px;
}

.stat-info h3 {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.stat-value {
    margin: 5px 0;
    font-size: 24px;
    font-weight: bold;
}

.stat-desc {
    margin: 0;
    font-size: 12px;
    color: #999;
}

.up {
    color: #52c41a;
}

.down {
    color: #ff4d4f;
}

/* 仪表盘部分 */
.dashboard-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.view-all {
    color: #1890ff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.view-all:hover {
    color: #40a9ff;
    text-decoration: underline;
}

/* 订单表格 */
.order-table table {
    width: 100%;
    border-collapse: collapse;
}

.order-table th,
.order-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.order-table th {
    background-color: #fafafa;
    font-weight: 600;
    color: #333;
}

.order-table tr:hover {
    background-color: #f5f5f5;
}

.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status.pending {
    background: #fffbe6;
    color: #faad14;
    border: 1px solid #ffe58f;
}

.status.shipped {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.btn-action {
    padding: 4px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-action:hover {
    color: #1890ff;
    border-color: #1890ff;
}

/* 图表卡片 */
.chart-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.chart-card h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
}

.chart-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.chart-container-1 {
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.chart-container-1:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.chart-container-1 img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.booksInfo {
    padding: 10px 15px;
    font-size: 14px;
    color: #666;
    height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.booksPrice {
    padding: 0 15px 15px;
    color: #ff4d4f;
    font-weight: bold;
    font-size: 16px;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .chart-container-1 {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 576px) {
    .chart-container-1 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}